package com.wasion.pwportable.protocol.analyzer.indicator;

import com.wasion.pwportable.protocol.analyzer.AbstractAnalyzer;

/**
 * 
 * @ClassName: Trival_Current_Params_RD_Analyzer
 * @Description: 4C. 电缆故障指示器零序电流校表参数
 * @author 高意
 * @date 2014-9-11 上午10:09:33
 * 
 */
public class Trival_Current_Params_RD_Analyzer extends AbstractAnalyzer {

	@Override
	public void dataAnalysis(String ackBS) {

		String laoddata = ackBS.substring(DATABITSTART, DATABITSTART + 4);

		double load = getCurrentInverted(laoddata);
		result.setLineLoad(load);

		String sampleData = ackBS.substring(DATABITSTART + 4, DATABITSTART + 8);
		String sample = sampleData.substring(2, 4) + sampleData.substring(0, 2);
		result.setSample(Integer.parseInt(sample, 16));
	}
}
